package design.graduation.novelwebsite.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: 洪少尉
 * @Date: 2020/4/20 15:00
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "website_include_book")
public class IncludeBook implements Serializable {
	/**
	 * 主键
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 书名
	 */
	@TableField(value = "book_name")
	private String bookName;

	/**
	 * 作者
	 */
	@TableField(value = "author")
	private String author;

	/**
	 * 一级分类
	 */
	@TableField(value = "primary_classification")
	private Integer primaryClassification;

	/**
	 * 二级分类
	 */
	@TableField(value = "secondary_classification")
	private Integer secondaryClassification;

	/**
	 * 三级分类
	 */
	@TableField(value = "tertiary_classification")
	private String tertiaryClassification;

	/**
	 * 内容简介
	 */
	@TableField(value = "introduction")
	private String introduction;

	/**
	 * 总点击数
	 */
	@TableField(value = "total_clicks")
	private Integer totalClicks;

	/**
	 * 月点击数
	 */
	@TableField(value = "month_clicks")
	private Integer monthClicks;

	/**
	 * 保存时间
	 */
	@TableField(value = "create_time")
	@JsonFormat(pattern = "MM-dd")
	private Date createTime;

	/**
	 * 修改时间
	 */
	@TableField(value = "edit_time")
	@JsonFormat(pattern = "MM-dd")
	private Date editTime;

	/**
	 * 上架状态：0，下架；1，上架
	 */
	@TableField(value = "status")
	private Integer status;

	/**
	 * 保存地址
	 */
	@TableField(value = "save_addr")
	private String saveAddr;

	private static final long serialVersionUID = 1L;

	public static final String COL_ID = "id";

	public static final String COL_BOOK_NAME = "book_name";

	public static final String COL_AUTHOR = "author";

	public static final String COL_PRIMARY_CLASSIFICATION = "primary_classification";

	public static final String COL_SECONDARY_CLASSIFICATION = "secondary_classification";

	public static final String COL_TERTIARY_CLASSIFICATION = "tertiary_classification";

	public static final String COL_INTRODUCTION = "introduction";

	public static final String COL_TOTAL_CLICKS = "total_clicks";

	public static final String COL_MONTH_CLICKS = "month_clicks";

	public static final String COL_CREATE_TIME = "create_time";

	public static final String COL_EDIT_TIME = "edit_time";

	public static final String COL_STATUS = "status";

	public static final String COL_SAVE_ADDR = "save_addr";
}